#include "StdAfx.h"
#include "ObjectManager.h"

using namespace GameServer::Managers;
using namespace GameServer::Objects;

CObjectManager::CObjectManager(void)
{
	uPlayerCount = 0;
	uMonsterCount = 0;
}


CObjectManager::~CObjectManager(void)
{
}


bool CObjectManager::AddObject(CMuObject* muObject)
{
	return this->mapObjects.insert(make_pair(muObject->Index(), muObject)).second;
}


bool CObjectManager::DelObject(CMuObject* muObject)
{
	this->mapObjects.erase(muObject->Index());

	if( this->mapObjects.find(muObject->Index()) == this->mapObjects.end() ) 
	{
		return false;
	}

	return true;
}


CMuObject* CObjectManager::GetObject(unsigned short index)
{
	return nullptr;
}


CMuObject* CObjectManager::GetObject(string name)
{
	return nullptr;
}